﻿using HuiZe.education.Resource.Controls;
using HuiZe.education.ViewModel;
using System.Windows;
using System.Windows.Controls;

namespace HuiZe.education.View
{
    /// <summary>
    /// NewGroupView.xaml 的交互逻辑
    /// </summary>
    public partial class NewGroupView : HuiZeWindow
    {
        public NewGroupView()
        {
            InitializeComponent();
            this.MaxHeight = System.Windows.Forms.Screen.PrimaryScreen.WorkingArea.Height + 10;
            this.MaxWidth = System.Windows.Forms.Screen.PrimaryScreen.WorkingArea.Width + 10;
        }

        private void YCButton_Click(object sender, RoutedEventArgs e)
        {
            Close();
        }

        private void YCButton_Click_1(object sender, RoutedEventArgs e)
        {
            //ShowDialogResult = true;

            MySpaceViewModel mySpaceViewModel = DataContext as MySpaceViewModel;
            //var model = mySpaceViewModel.SelectedGroupModel;
            //Button btn = sender as Button;

            //string name=

            mySpaceViewModel.addGroup();
            //switch (btn.Name)
            //{
            //    case "modify":
            //        break;
            //    case "dele":
            //        mySpaceViewModel.MyGroups.Remove(model);
            //        break;

            //}
            Close();
        }
    }
}
